<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>员工详情</title>
    <!-- 引入Bootstrap CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
    <h1 class="text-center mb-4">员工详情</h1>
    <div class="card shadow-sm">
        <div class="card-body">
            <p class="card-text"><strong>ID:</strong> <span th:text="${employee.id}"></span></p>
            <p class="card-text"><strong>姓名:</strong> <span th:text="${employee.name}"></span></p>
            <p class="card-text">
                <strong>薪资:</strong>
                <span th:text="${'￥' + #numbers.formatDecimal(employee.salary, 1, 2)}"></span>
            </p>
            <p class="card-text">
                <strong>生日:</strong>
                <span th:text="${#temporals.format(employee.birthday, 'yyyy-MM-dd')}"></span>
            </p>
            <p class="card-text"><strong>头像:</strong></p>
            <img th:src="@{/images/{name}(name=${employee.photo})}"
                 alt="员工头像"
                 class="img-thumbnail"
                 style="max-width: 200px; max-height: 200px;">
        </div>
    </div>
    <div class="mt-4">
        <a th:href="@{/employee/list}" class="btn btn-primary">返回列表</a>
    </div>
</div>
<!-- 引入Bootstrap JS（可选） -->
<script src="/js/bootstrap.bundle.min.js"></script>
</body>
</html>